<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta charset="utf-8">
<title> New Event Registration</title>
<meta http-equiv="Content-Type" cotent="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/Style.css" />
<link href='http://fonts.googleapis.com/css?family=Lily+Script+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Rock+Salt' rel='stylesheet' type='text/css'>
</head>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="java.util.ArrayList,es.ats.codington.festival.domain.Event" %>
<% Event uEvent = (Event) request.getAttribute("uEvent");%>
<%
int isAdmin = 0;
String visitorName=null;
Cookie cookie= null;
Cookie[] cookies=request.getCookies();
if(cookies!=null){
	for(int i=0; i<cookies.length; i++){
		cookie=cookies[i];
		if(cookie.getName().compareTo("user")==0)
		visitorName=cookie.getValue();
	}
}
%>
<c:set var="userName" value="<%= visitorName%>"></c:set>


<body>

<header class="cabecera">

<div class="image">

	<img src="Images/Skyline.png" alt="Mi titulo de la imagen">

	
	
	<div class="login"> 
		<img src="Images/icon.png" alt="icono">
		<a href="infVisitor.htm"><c:out value="${userName}"></c:out></a> / <a href="index.htm">LogOut</a>
	</div>
</div>




<nav class="nav"> 
	<ul class="menu">
		<li><a href="index2.htm"> Home</a></li>
		<li><a href="#"> North Town</a>
			<ul>
				<li><a href="museum.htm"> Museum</a></li>
				<li><a href="theater.htm"> Theater</a></li>
				<li><a href="stadium.htm"> Stadium</a></li>
				<li><a href="business.htm"> Business</a></li>
			</ul>
		</li>
		<li><a href="#"> South Town</a>
			<ul>
				<li><a href="park.htm"> Park</a></li>
				<li><a href="zoo.htm"> Zoo</a></li>
				<li><a href="attractions.htm"> Attractions</a></li>
				<li><a href="markets.htm"> Markets</a></li>
			</ul>
		</li>
		<li><a href="show_events.htm"> Events</a></li>
	</ul>
 </nav>

</header>

<div class="Container">
	<h2>Edit Event</h2>

<div id="marcoForm">
	<form action="update_event.htm" method="post" name="form">
		<input type="hidden" name="eventId" value=<%=uEvent.getEventId()%>>
		
		<label for="eventName" > Event Name*:</label>
		<input type="text" name="eventName" id= "eventName" value="<%= uEvent.getEventName()%>" placeholder="Write event name" minlength="1" maxlength="30" tabindex="1" required/> 
		<br>
		<br>
		<label for="eventDescrip"> Event Description*:</label>
		<input type="text" name="eventDescrip" id= "eventDescrip" value="<%= uEvent.getEventDescription()%>" placeholder="Write a description" minlength="1" maxlength="200"  tabindex="2" required/> 
		<br>
		<br>
		<label for="place"> Places*:</label>
		<select name="place" id= "place" tabindex="3" required/> 
            <option value="1"> 1. Museum</option>
            <option value="2"> 2. Large Business</option>
            <option value="3"> 3. Stadium</option>
            <option value="4"> 4. Theater</option>
            <option value="5"> 5. Park</option>
            <option value="6"> 6. Tourist Attractions</option>
            <option value="7"> 7. Traditional Markets</option>
            <option value="8"> 8. Zoo</option>
        </select>
		<br>
		<br>
		<label for="duration" > Duration*:</label>
		<input type="text" name="duration" id="duration" value="<%= uEvent.getDuration()%>" placeholder="Write duration" minlength="1" maxlength="30"  tabindex="4" required/> 
		<br>
		<br>
		<label for="eventType"> Event Type*:</label>
		<input type="text" name="eventType" id="eventType" value="<%= uEvent.getEventType()%>" placeholder="Write event type" minlength="3" maxlength="200"  tabindex="5" required/> 
		<br>
		<br>
		<label  for="ticket"> Available Tickets*:</label>
		<input type="number" name="ticket" id="ticket" value="<%= uEvent.getTickets()%>" placeholder="Write available tickets" minlength="1" pattern="[0-9]" maxlength="12"  tabindex="6" required/> 
		<br>
		<br>
		<br>
		<input type="submit" value="Update Event">
	</form>
</div>
</div>

<footer> Copyright @ 2015 All rights reserved </footer>
</body>

</html>